package cn.autumnorange.app.money.api;

import cn.autumnorange.app.common.dto.ResultDto;
import cn.autumnorange.app.money.api.dto.MoneyDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(
    value = "app-money-provider2",
    //        fallback = AccountServiceImpl.class
    fallbackFactory = AccountFallbackFactory2.class
    //        ,
    //        configuration = FeignHeaderInterceptor.class
    )
public interface MoneyService2 {

  @PutMapping(value = "/{version}/{money}/add2")
  ResponseEntity<ResultDto<MoneyDto>> add2(
      @PathVariable(value = "version") Long version, @PathVariable(value = "money") Long money);

  @GetMapping(value = "/{id}/getVersion2")
  ResponseEntity<ResultDto<Long>> getVersion(@PathVariable(value = "id") Long id);
}
